// Domain/Repositories/ISystemConfigRepository.cs
using UniversalAdmin.Domain.Entities;

namespace UniversalAdmin.Domain.Repositories;

public interface ISystemConfigRepository : IRepository<SystemConfig>
{
  // 键值操作
  Task<SystemConfig?> GetByKeyAsync(string key);
  Task<string?> GetValueByKeyAsync(string key, string? defaultValue = null);
  Task SetValueByKeyAsync(string key, string value);

  // 批量操作
  Task<IEnumerable<SystemConfig>> GetByKeysAsync(IEnumerable<string> keys);
  Task<IEnumerable<SystemConfig>> GetByIdsAsync(IEnumerable<int> ids);
  Task UpdateMultipleAsync(IEnumerable<SystemConfig> configs);
}